<?php
namespace Hilaoyu\LaravelExtend\Providers;

use Hilaoyu\LaravelExtend\Supports\SubApp;
use Hilaoyu\LaravelPrivateApi\PrivateApiService;
use Illuminate\Support\ServiceProvider;


class RealnameServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {

    }

    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {


        SubApp::registerCommands(dirname(__DIR__).'/Services/Realnames/Commands','Hilaoyu\\LaravelExtend\\Services\\Realnames\\Commands');


        if(config('realname.provide_service')){
            PrivateApiService::regiserRoutes(dirname(__DIR__) . '/Services/Realnames/private_service_routes','Hilaoyu\\LaravelExtend\\Services\\Realnames\\Controllers',[
                'name'=>'l-e-s.realnames.service'
            ]);
        }

    }


}
